(function($){
	//定时获取订单详情
	//setInterval($.getOrderDetail($.global.order_id),5000);
	//setInterval('$.pollingGetException()',5000);
	//轮训订单信息
	window.setInterval('$.getOrderDetail($.global.id)',5000);
	//获取欢行地址
	$.getHappytripUrl();
	//关闭页面时数据保存
	$(window).unload(function(){
	    window.localStorage.setItem('happytrip.control',JSON.stringify($.control));
	    window.localStorage.setItem('happytrip.global' ,JSON.stringify($.global));
	    window.localStorage.setItem('happytrip.moco'   ,JSON.stringify($.moco));
	});
	$(window).ready(function(){
	    var controls = JSON.parse(window.localStorage.getItem('happytrip.control'));
	    var globals  = JSON.parse(window.localStorage.getItem('happytrip.global'));
	    var mocos    = JSON.parse(window.localStorage.getItem('happytrip.moco'));
	    $.control 	= $.extend($.control,controls); //controls||$.control;
	    $.moco 		= $.extend($.moco,mocos);//mocos||$.moco;
		if (globals){
			$.global = globals;
		    $('#happytripId').text('['+($.global.id||'id')+']');
			$('#didiId').text('['+($.global.order_id||'orderId')+']');
		}
		$.moco.setException[0].value = 'clear,createId,createOrder,cancelOrder,feeConfirm,complaint,getOrderInfo,comment,getToken';
	});
})(jQuery);